Electronic systems are known that include a memory the contents of which are representative of predetermined homogenous units and which perform particular methods for the management of the memory. For example, electronic payment systems using a memory card are known. In such systems, at least one zone of the card memory is intended for entering the transactions into the account, or memorizing them, so they can be paid. Elementary cells of the zone then represent the homogeneous payment units, and either the card can be prepaid--that is, the allocated credit depends on a sum of money effectively paid in advance--or the consumption of units may be used to prepare a later bill. It is understood that the example of payment systems is in no way limiting, and other applications have already been conceived of. Such a memory can thus be used in entering any kind of transactions, not necessarily involving compensation in the form of payment.
In such systems, the memory zone used for bookkeeping entry is generally an electrically programmable memory (or EPROM), and for each accounting operation the management unit of the memory modifies the structure of the memory by "grilling" or modifying at least one cell of the zone.
In the earliest designs for payment systems using an electronic memory, the initial credit was represented by a number of unmodified cells of the zone, and each transaction was accompanied by modifying of one cell of the zone as follows: reading of the available elements in the zone of memory allocated to the transactions was performed in one direction, and writing (inscription, or modifying) in another direction. When read, the credit limit was found when the management system detected the first grilled cell it encountered. Before a first transaction, by convention, it was assumed that a first modified cell was located at the end of the zone. At the time of a transaction, the system was positioned just before the first modified cell encountered in the reading operation, and it counted out the number of units corresponding to the transaction, and then modified the last cell counted. Thus when the various transactions related to a plurality of units, some unmodified cells remained between the first modified cell encountered at the time of reading and the end of the zone. These first systems had the major disadvantage of not being rechargeable; that is, once the credit had been exhausted, the memory could not be re-used.
To overcome these disadvantages, methods of memory management have been conceived that permit recharging, or in other words the allocation of new units when the initial credit is exhausted or nearly exhausted. Thus in the case of memory card payment systems, a possible allocation of new credit has been conceived of.
Recharging, or allocation of new credit, comprises making at least some of the cells usable that are located past the first modified cell encountered in reading. To do so, methods and systems have been designed that make it possible, at the time of reading, to ignore the cells modified in previous transactions. To this end, at the time of the transaction, generally an intervention is made at a cell which is modified, and upon recharging, an intervention is made by modifying another cell paired with the first one; depending on the state, this indicates whether the first cell is the effective credit limit, or whether it must be ignored since recharging has taken place. Methods and systems based on this principle are known from European Patent Application No. 022 75 32 and French Patent Application 2 605 431.
In the European application, the memory intended or entry of units is divided into two zones of equal capacity; a first zone is the payment zone, and the second is the recharging zone. At the outset, when the memory is blank, all the binary cells are in a predetermined logical state, for instance corresponding to logical "1". The allocation of an initial credit of N units, if N is less than the capacity of the memory, comprises modifying the N+1th cell encountered in reading in the recharging zone, starting at the beginning of that zone, such that a pair (A, B) of cells of binary value (1, 0) comprises a stop; A is the cell having the rank N+1 in the payment zone, and B is the cell of rank N+1 in the recharging zone. When a transaction necessitates debiting of units, then starting at the beginning of the zones, as many pairs are counted as there are units to be debited, and the state of the last cell counted in the payment zone is modified, without changing the state of the corresponding cell of the recharging zone.
The next time there is a transaction, a search for the last cell modified in the payment zone is made, and from that cell toward the stop, as many pairs are counted as there are units to be debited. It will be understood that in every case, if the transaction involves a greater number of units than there are units available, the transaction is denied.
At the time of recharging, the management unit begins by entering the balance on the card at the moment of the recharging order; that is, the number of pairs in their original state located between the last pair modified and the initially placed stop is entered. Then, starting again at the beginning of the zones, the management unit places a new stop, once a number of intact pairs equal to the amount to be recharged plus the balance is counted. The stop is accomplished with the pair having the next higher rank than the result of the addition. Following this creation of a new stop, the unmodified cell of all the pairs that had a modified cell between the creation of the previous stop and the creation of the present stop, that is, the pairs corresponding to the old stop and to the prior transactions, is modified in turn, in such a manner that later operations ignore these pairs.
This method has various disadvantages in terms of its implementation.
On the one hand, the difference in constitution between the pairs indicating the stop and the pairs indicating the various transactions that have taken place necessitates having a relatively complicated exploitation system, since each pair can assume four different possible configurations: the state 1, 1 corresponding to an available unit; the state 0, 1 corresponding to a transaction; the state 1, 0 corresponding to a stop; and finally the state 0, 0 corresponding to a pair to be ignored. On the other hand, at the time of the transaction, all the memory must be read at least one more time, element by element, as far as the stop, in order to mark the position of the pair inscribed at the time of the last transaction. Finally, recharging is relatively complicated, since after a new stop has been put into position, the entire memory zone located between the new stop and the beginning of the zone must be reread, on the one hand in order to neutralize the previous stop and on the other to neutralize the pairs modified at the time of the series of earlier transactions.
The invention described in French Patent Application 2 605 431 makes it possible to partially overcome these disadvantages, since there is no difference between the stop and the writing done at the time of the transactions. Before a transaction, the exploitation system looks for the stop placed beforehand and creates a new stop toward the beginning of the zone. The memory includes a single zone comprising elements each having an address and an even number of cells. When the memory is in its initial state, it is said that each element is even; when it includes an odd number of cells in their initial state, the element is said to be odd; when all the cells have been modified, then the element is said to be neutral.
The positioning of a stop comprises making a formerly even element odd, by changing the state of one of its cells, while recharging comprises making odd elements available by making them even again, while ignoring elements no longer having any modifiable cell.
Before each transaction, the balance is determined by the number of even, non-neutral elements encountered before the stop, which accordingly is the first odd element encountered in reading.
This method has the major disadvantage that searching for the last stop before each transaction necessitates reading cell by cell from the beginning of the memory in order to determine the parity of each element, since the stop comprises the first odd element encountered in reading.
Moreover, the same element that initially contained an even number of cells greater than two, for example four, six or more, can be used for several transactions after recharging, which makes management considerably more complicated. In effect, recharging comprises creating a new stop toward the bottom of the memory, and then making the odd elements between the last stop before recharging and the new stop to be created (that is, all the elements that had been modified in the last series of transactions before recharging) available, or in other words making them even; moreover, the creation of the new stop must take into account the fact that some of these elements that were made odd, including the last stop, are likely to become neutral, while others are once again usable.
Hence on the one hand it is necessary to enter the number of reusable elements precisely; on the other, the parity of all the elements encountered from the beginning of the zone must be determined by reading cell by cell, which considerably increases the processing time. Moreover, as in the other method in the prior art, a large number of cells must be modified at the time of recharging, which entails not-insignificant risks of error, and loss of money in the case of devices used for payment.